Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@textlint/kernel
Advanced tools
textlint kernel is core logic by pure JavaScript.
This module is a low layer of textlint.
No plugin, No rule, No filter rule by default.
Install with npm:
npm install @textlint/kernel
import { TextlintKernel } from "@textlint/kernel";
const kernel = new TextlintKernel();
const options = {
filePath: "/path/to/file.md",
ext: ".md",
plugins: [
{
pluginId: "markdown",
plugin: require("@textlint/textlint-plugin-markdown")
}
],
rules: [
{
ruleId: "no-todo",
rule: require("textlint-rule-no-todo").default
}
]
};
kernel.lintText("TODO: text", options).then(result => {
assert.ok(typeof result.filePath === "string");
assert.ok(result.messages.length === 1);
});
Notes: Preset is a collection of Rules.
Currently, presets
option does not exist.
@textlint/kernel
export core types of textlint.
If you use TypeScript, this types help you.
// Types
import {
TextlintResult,
TextlintFixResult,
TextlintFixCommand,
TextlintMessage,
// Kernel rule/filter/plugin format
TextlintKernelRule,
TextlintKernelFilterRule,
TextlintKernelPlugin,
// textlint rule interface
TextlintRuleCreator,
TextlintRuleOptions,
// textlint filter rule interface
TextlintFilterRuleCreator,
TextlintFilterRuleOptions,
// textlint plugin interface
TextlintPluginCreator,
TextlintPluginOptions,
TextlintPluginProcessor,
TextlintPluginProcessorConstructor
} from "@textlint/kernel";
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu
FAQs
textlint kernel is core logic by pure JavaScript.
The npm package @textlint/kernel receives a total of 69,400 weekly downloads. As such, @textlint/kernel popularity was classified as popular.
We found that @textlint/kernel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.